# @Time : 2023/1/9
# @Author : SDAJAVA

# 谷歌浏览器驱动下载，找到谷歌浏览器对应的大版本号，下载对应的操作系统zip文件
# https://chromedriver.storage.googleapis.com/index.html

from selenium import webdriver
from selenium.webdriver.chrome.service import Service
from selenium.webdriver.common.by import By

# 创建浏览器操作对象
path = Service("chromedriver.exe")
browser = webdriver.Chrome(service=path)

# jd_url = "https://www.jd.com/"
# browser.get(jd_url)
#
# content = browser.page_source
# print(content)

baidu_url = "https://www.baidu.com/"
browser.get(baidu_url)

input = browser.find_element(By.ID, "su")
print(input.get_attribute('class'))
print(input.tag_name)
print(input.text)
